package com.litchishell;

import java.awt.*;

/**
 * @author LitchiShell
 * @description:
 * @create 2022-02-02
 */
public class CommonObject {
    int x;
    int y;

    int width;
    int height;

    Image img;

    /* 标记是否能移动 */
    boolean flag = false;

    int weight;

    int integral;

    /* 1 金块、2 石块 */
    int type;

    void paintSelf(Graphics g) {
        g.drawImage(img, x, y, null);
    }

    public int getWidth() {
        return width;
    }

    public Rectangle getRect() {
        return new Rectangle(x, y, width, height);
    }
}
